package com.example.mapper;

import com.example.domain.ZoneAnnualoutput;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ZoneAnnualoutputMapper {

    @Select("select * from wmy.zone_annualoutput")
    List<ZoneAnnualoutput> getAll();

    @Select("select * from wmy.zone_annualoutput where zone_id = #{zoneId}")
    ZoneAnnualoutput getById(Integer zoneId);

    @Insert("insert into wmy.zone_annualoutput (zone_id, annualoutput_id) values (#{zoneId}, #{annualoutputId})")
    boolean add(ZoneAnnualoutput zoneAnnualoutput);

    @Update("update wmy.zone_annualoutput set zone_id=#{zoneId},annualoutput_id=#{annualoutputId} where zone_id = #{zoneId}")
    boolean update(ZoneAnnualoutput zoneAnnualoutput);

    @Delete("delete from wmy.zone_annualoutput where zone_id = #{zoneId}")
    boolean delete(Integer zoneId);

}
